/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-11
 * Time: 21:39
 */
//在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
public class test {
    public static void main(String[] args) {
        int a1=1,a2=2;
        double d1=1.1,d2=2.2,d3=3.3;
        System.out.println(max(a1,a2));
        System.out.println(max(d1,d2,d3));
    }
    public static int max(int a,int b){
        return a>b?a:b;
    }
    public static double max(double a,double b,double c){
        double d=a>b?a:b;
        return c>d?c:d;
    }
}
